Skip to content

Instantly share code, notes, and snippets.

@marcosdotme
marcosdotme / generate_parametrize.py
Created May 12, 2024 22:01
Generate inputs and expected outputs for `pytest.mark.parametrize`
import itertools
import json
from typing import Dict
from typing import List
FIELDS = {
'jira_project_key': True,
'issue_epic_number': False,
'issue_number': True,
@virattt
virattt / langgraph-financial-agent.ipynb
Created January 8, 2024 22:01
LangGraph-financial-agent.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
<style>
.scroll-box {
position: relative;
width: 300px; /* Adjust to fit your design */
@MichaelGatesDev
MichaelGatesDev / remove_dupes.py
Created August 10, 2021 01:55
Remap & Remove Duplicate Materials + Textures in Blender
import bpy
# credit to https://blender.stackexchange.com/questions/75790/how-to-merge-around-300-duplicate-materials/229803#229803
# remove duplicate materials
def remove_duped_materials():
mats = bpy.data.materials
for mat in mats:
(original, _, ext) = mat.name.rpartition(".")
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
<style>
.scroll-box {
position: relative;
width: 300px; /* Adjust to fit your design */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
<style>
.scroll-box {
position: relative;
width: 300px; /* Adjust to fit your design */
@wilsonsilva
wilsonsilva / undo_last_commit.sh
Created June 21, 2017 15:47
Undo last commit but keep changes
# https://stackoverflow.com/a/44672195/3013522
git reset --soft HEAD~1
@balloob
balloob / config.h
Last active May 12, 2024 21:53
ESP8266 sketch to control a Whynter ARC-110WD portable air conditioner and monitor temperature using MQTT, infrared transmitter, DHT22. For a list of possible IR codes see https://docs.google.com/spreadsheets/d/1dsr4Jh-nzC6xvSKGpLlPBF0NRwvlpyw-ozg8eZU813w/edit#gid=0
#define wifi_ssid "YOUR_WIFI_NAME"
#define wifi_password "YOUR_WIFI_PASSWORD"
#define mqtt_server "MQTT_SERVER"
#define mqtt_user "MQTT_USER"
#define mqtt_password "MQTT_PASS"
#define ac_topic "device/study_room/ac"
#define temperature_topic "device/study_room/temperature"
#define humidity_topic "device/study_room/humidity"
@inflammable
inflammable / base58.js
Created June 14, 2012 09:50
Base58 (and other) Encoding and Decoding in Javascript
/*
* base58.js
* - encodes integers to and decodes from a base58 (or your own) base58 alphabet
* - based on Flickr's url shortening
*
* usage:
* base58.encode(integer);
* base58.decode(string);
*
* (c) 2012 inflammable/raromachine
@gp187
gp187 / currencies.json
Created February 9, 2017 12:32
All currencies in JSON -- Array of Objects
[{
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
}, {
"symbol": "CA$",